package test2;

public class ListUnit {
    public static ListNode createList(int[] arr) {
        ListNode head = new ListNode(0);
        ListNode cur = head;
        for (int i = 0; i < arr.length; i++) {
            cur.next = new ListNode(arr[i]);
            cur = cur.next;
        }
        return head.next;
    }
}
